﻿using System;
using Genko.Model.Schema;

namespace Genko.Model
{
	public class MetaModel : EntityType
	{
		protected internal MetaModel()
		{
			
		}
		
		protected internal MetaModel(SchemaSet owner)
		{
			base.Initialize(owner);
		}

		protected internal MetaModel(SchemaSet owner, string name)
		{
			base.Initialize(owner);
			this.Name = name;
		}

		public override string TagName
		{
			get
			{
				return SchemaTags.MetaModelTag;
			}
		}

		[MemberActivator(SchemaTags.CLASS_TAG)]
		public virtual Member CreateClassType()
		{
			return new ClassType(this);
		}

		[MemberActivator(SchemaTags.DATA_TYPE_TAG)]
		public virtual Member CreateDataType()
		{
			return new DataType(this);
		}

		[MemberActivator(SchemaTags.ENUM_TAG)]
		public virtual Member CreateEnumType()
		{
			return new EnumType(this);
		}
	}
}
